package com.uk.ui.tarifa;

import com.uk.data.containers.TarifaContainer;
import com.uk.myclasses.ATable;
import com.uk.ui.ColumnGeneratorUtils;

public class TarifaList extends ATable{


	public TarifaList(TarifaPanel tarifaPanel) {
		setSizeFull();
		this.setContainerDataSource(tarifaPanel.getDataSource());
		this.setVisibleColumns(TarifaContainer.NATURAL_COL_ORDER);
		this.setColumnHeaders(TarifaContainer.COL_HEADERS_ALBANIAN);
		setColumnCollapsingAllowed(true);
		setColumnReorderingAllowed(true);
		this.setColumnAlignment("cmimi", ALIGN_RIGHT);
		this.setPageLength(15);
		setSelectable(true);
		setImmediate(true);
		addListener((ValueChangeListener) tarifaPanel);
		setNullSelectionAllowed(false);
		this.addGeneratedColumn("aplikoTVSH", ColumnGeneratorUtils.PoJoColumnGenerator());
		this.addGeneratedColumn("uk", ColumnGeneratorUtils.PoJoColumnGenerator());
		this.addGeneratedColumn("neListe", ColumnGeneratorUtils.PoJoColumnGenerator());
	}

	/*@Override
	protected String formatPropertyValue(Object rowId, Object colId,
			Property property) {
		Object v = property.getValue();
		 if (v instanceof Date) {
			 Date dateValue = (Date) v;
			 SimpleDateFormat sdf = new SimpleDateFormat("dd.MM.yyyy");
			 return sdf.format(dateValue);
		  }
		return super.formatPropertyValue(rowId, colId, property);
	}*/

	


}
